Que 1. I want to throw an error if link has not created how can i achieve this? Is there any method which tells us that link has not created? Que 2. Also can you specify what are the different scenarios which can not let us create a link. I can only see one possibility which is if that user has no modify access for that module or object then in that case he can't create a link isn't it?Correct me if i am wrong. What are the different other scenarios? Please provide me answers for both questions. Thanks in advance. Mayur Chaudhari - Wed Jan 24 03:58:37 EST 2018 |
Re: Is there any method which tells us link is not created? Hi! In contrast to what I stated last week and in contrast to what the DXL Manual states, it seems like the perm "oSrc -> "linkmod" -> oTgt" does return a Link object. And an error might created when the link cannot be created. So, the following code should work
noError();
Link L = oSrc -> (fullName mnLink) -> oTgt
string errMsg = lastError()
if (null L || !null errMsg) {
tellTheUserSomehowThatTheLinkWasNotCreatedAndGiveThem_errMsg()
return false
}
as to the conditions: I think the posts in https://www.ibm.com/developerworks/community/forums/html/topic?id=7c256967-0550-426d-9f3d-cbf9ca72afef should cover more or less all scenarios, read the answers again and if you have questions or did not understand the scenarios, feel free to ask more questions. It is probably the best if you manually try to create links to two fresh modules and see what has to be done. plus, look at the link restrictions in module properties. all this needs to be set up and you might check all these things using DXL |